<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script src="https://cdn.staticfile.net/jquery/1.10.2/jquery.min.js"></script>

<button>获取时间</button>

<script>
    $("button").click(function () {
        $.ajax({
            url: "/time",
            success: function (result) {
                alert("获取到的时间为"+result)
            }
        });
    });
</script>

</body>
</html>